/*
 * $Id: WebObjectForm.java 112 2009-07-01 11:33:10Z donbeave $
 */

package labour.manager.client.widget.form;

import labour.concept.engine.client.data.EngineObject;

import com.extjs.gxt.ui.client.widget.form.FormPanel;
import com.extjs.gxt.ui.client.widget.form.LabelField;
import com.extjs.gxt.ui.client.widget.form.TextField;

public class WebObjectForm extends FormPanel {

  private TextField<String> pathField;
  private TextField<String> urlField;
  private LabelField fullPathField;

  public WebObjectForm() {
    setHeading("Web");

    setFrame(true);

    pathField = new TextField<String>();
    pathField.setFieldLabel("Path");
    add(pathField);

    urlField = new TextField<String>();
    urlField.setFieldLabel("URL");
    add(urlField);

    fullPathField = new LabelField();
    fullPathField.setFieldLabel("Full Path");
    add(fullPathField);
  }

  public WebObjectForm(EngineObject model) {
    this();

    setModel(model);
  }

  public TextField<String> getPathField() {
    return pathField;
  }

  public TextField<String> getUrlField() {
    return urlField;
  }

  public LabelField getFullPathField() {
    return fullPathField;
  }

  @Override
  @SuppressWarnings("unchecked")
  public EngineObject getModel() {
    return super.getModel();
  }

  public void setModel(EngineObject model) {
    super.setModel(model);
  }

}
